//
//  CustomTableViewCell.m
//  WealthManager
//
//  Created by rimi on 15/9/29.
//  Copyright (c) 2015年 魏攀. All rights reserved.
//

#import "CustomTableViewCell.h"

@implementation CustomTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initializeAppearance];
    }
    return self;
}
#pragma mark - private methods
- (void)initializeAppearance {
    self.backgroundColor = COLOR_RGB(104, 70, 21, 1);
    [self addSubview:self.titleImage];
    [self addSubview:self.nameImage];
}
#pragma mark - getter
- (UIImageView *)titleImage {
    if (!_titleImage) {
        _titleImage = ({
            UIImageView * view = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 60, 70)];
            view;
        });
    }
    return _titleImage;
}
- (UIImageView *)nameImage {
    if (!_nameImage) {
        _nameImage = ({
            UIImageView * view = [[UIImageView alloc]initWithFrame:CGRectMake(70, 20, 60, 30)];
            view;
        });
    }
    return _nameImage;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    if (self.selected) {
        self.backgroundView = [[UIImageView alloc]initWithImage:IMAGE_CONTENT(@"首页-1_07_07.png")];
    }else {
         self.backgroundView = [[UIImageView alloc]initWithImage:IMAGE_CONTENT(@"首页-1_04.png")];
    }
    
    // Configure the view for the selected state
}

@end
